<template>
	<view class="service-container">

		<view class="service-grid">
			<view v-for="(service, index) in moreServices" :key="index" class="service-item"
				@click="navigateToService(service.id)">
				<image class="service-icon" :src="service.icon"></image>
				<text class="service-name">{{ service.name }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				moreServices: [{
						id: 'admission',
						name: '住院服务',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'insurance',
						name: '医保查询',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'medication',
						name: '药品查询',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'registration',
						name: '挂号记录',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'feedback',
						name: '意见反馈',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'guide',
						name: '就医指南',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'doctor',
						name: '医生介绍',
						icon: '/static/index/yuyue.png'
					},
					{
						id: 'contact',
						name: '联系我们',
						icon: '/static/index/yuyue.png'
					},
				]
			}
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			navigateToService(serviceId) {
				uni.navigateTo({
					url: `/pages/${serviceId}/index`
				});
			}
		}
	}
</script>

<style>
	.service-container {
		padding: 20rpx;
		background-color: #f5f7fa;
		min-height: 100vh;
	}

	.header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 0;
		margin-bottom: 30rpx;
	}

	.title {
		font-size: 36rpx;
		font-weight: bold;
	}

	.back-button {
		padding: 10rpx 20rpx;
		font-size: 28rpx;
		color: #3295e6;
	}

	.service-grid {
		display: flex;
		flex-wrap: wrap;
		background-color: white;
		border-radius: 12rpx;
		padding: 20rpx;
	}

	.service-item {
		width: 25%;
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 30rpx 0;
	}

	.service-icon {
		width: 80rpx;
		height: 80rpx;
		margin-bottom: 10rpx;
	}

	.service-name {
		font-size: 24rpx;
		text-align: center;
	}
</style>